<?php
if ($complete) {
    $status = 'Closed';

} else $status = 'Open';
if (($type == -1) || ($complete == -1)) {
    $mainFlag = true;
} else $mainFlag = false;

?>
<div id="profile-header-username" style="padding-top:5px;padding-bottom:0px;">
    <div style="float:left;padding-right:10px;padding-bottom:10px;">
        <span style="position:relative;top:3px;">
            <a onclick="HideShowAndUpdateCustomField(document.getElementById('profileheader'),'toggle0','Profile_ShowProfile');return false;"><img
                alt="toggleimage" src="images/collapse.gif"/></a>
        </span>
        <span style="font-size:24px;">

           <?php if ($mainFlag): ?>
            <a href="#" style="text-decoration:none;" onclick=""> Dispatches </a>
            <?php else: ?>
            <a href="#" style="text-decoration:none;" onclick=""><?=$status?> - <?=$type?> Dispatches </a>
            <?php endif; ?>
        </span>

        <span id="label_customerstatus" style="text-transform: capitalize; display: none; "><a
            href="javascript:ToggleStatus();"><span id="label_customerstatus_text"><?=$customer->activeText?></span></a></span>
    </div>
    <div class="clear"></div>
</div>

<img class="top-image" src="<?=getImageBySize($customer->image, 250, 250)?>" width="250"/>

<div id="profileheader" style="clear: both; ">
    <table border="0" cellpadding="0" cellspacing="10">
        <tbody>
        <tr>

            <td valign="top">


                <div id="profile-header-datecreated" style="clear:both;" class="profile-header-item">
                    <?php if ($mainFlag): ?>
                    This is a live overview of your dispatches for all your locations for the current year.
                    <?php else: ?>
                    This is a live overview of <?= $status ?> -  <?= $type ?> dispatches for all your locations for the
                    current year.
                    <?php endif;?>
                </div>

                <div id="profile-header-balance" class="profile-header-item">

                    </span></div>


            </td>
        </tr>
        </tbody>
    </table>
</div>